//
//  GYZDatePicker.h
//  DongDongWedding
//
//  Created by gyz on 16/8/5.
//  Copyright © 2016年 gl. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "GYZDatePickerModel.h"

typedef NS_ENUM(NSUInteger, GYZDatePickerStyle) {
    GYZDatePickerStyleYearMonthDayHourMinute,
    GYZDatePickerStyleYearMonthDay,
    GYZDatePickerStyleMonthDayHourMinute,
    GYZDatePickerStyleHourMinute
};
@protocol GYZDatePickerDelegate;
@interface GYZDatePicker : UIView <UIPickerViewDataSource, UIPickerViewDelegate>
@property (nonatomic, weak) id<GYZDatePickerDelegate> delegate;
@property (nonatomic, assign) GYZDatePickerStyle datePickerStyle;
@property (nonatomic,copy) void(^datePickerBlock)();
@property (nonatomic, strong) NSDate *minLimitedDate; ///< 最小限制时间；默认值为1970-01-01 00:00
@property (nonatomic, strong) NSDate *maxLimitedDate; ///< 最大限制时间；默认值为2060-12-31 23:59
@property (nonatomic, strong) NSDate *defaultLimitedDate; ///< 默认限制时间；默认值为最小限制时间，当选择时间不在指定范围，就滚动到此默认限制时间
@property (nonatomic, strong) NSDate *scrollToDate; ///< 滚动到指定时间；默认值为当前时间

- (instancetype)initWithFrame:(CGRect)frame delegate:(id<GYZDatePickerDelegate>)delegate datePickerStyle:(GYZDatePickerStyle)datePickerStyle;
- (void)remove;
- (void)showDatePicker;
@end
@protocol GYZDatePickerDelegate <NSObject>
@required
- (void)datePicker:(GYZDatePicker *)datePicker didSelectDate:(GYZDatePickerModel *)datePickerDate;

@end
